<template>
	<view class="container">
		<view class="title">{{article.title}}</view>
		<!-- view.row.flex-row>view.text*2 -->
		<view class="row flex-row">
			<view class="text">来源:{{article.source}}</view>
			<view class="text">{{article.updateTime}}</view>
		</view>
		<!-- H5  安卓 苹果 -->
		<!-- <view class="content" v-html="article.content"></view> -->
		<!-- 微信小程序的 -->
		<rich-text :nodes="article.content"></rich-text>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				article:{}
			}
		},
		onLoad(options) {
			this.id = options.id;
			this.getDetail();
		},
		methods: {
			getDetail(){
				this.$request({
					url:this.$api.getArticleDetail,
					data:{
						id:this.id
					},
					success:data=>{
						this.article = data;
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.container{
		background-color: #FFF;
		.title{
			font-size: 32rpx;
			font-weight: bold;
			padding: 30rpx 30rpx 10rpx;
		}
		.row{
			padding: 0 30rpx;
		}
		.content{
			padding: 30rpx;
			font-size: 28rpx;
			line-height: 1.4;			
		}
	}
</style>
